package com.yueshop.cart.feign;

import com.yueshop.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("yueshop-product")
public interface ProductFeignService {
    //通过skuid查询商品信息
    @RequestMapping("/product/skuinfo/info/{skuId}")
    //@RequiresPermissions("product:skuinfo:info")
     R info(@PathVariable("skuId") Long skuId);

    //通过skuid 获取销售属性
    @GetMapping("/product/skusaleattrvalue/stringlist/{skuId}")
     List<String> getSkuSaleAttrValues(@PathVariable("skuId")Long skuId);

    @GetMapping("/product/skuinfo/{skuId}/price")
     R getPrice(@PathVariable("skuId")Long skuId);

}
